﻿<%@ include file="/static/include/topLess.jsp"%>

<script type="text/javascript">
function closeCurwin(){
	parent.layer.close(parent.layer.index);
}
function queryComp(){
	window.document.searchForm.submit();
}
function selectOpt(pnames,pids){
	 if(pnames != ""){
		 var ids = pids + ",";
		 var names = pnames + ",";
		 var temp= document.getElementsByName('ch1');
	     for(var i=0;i<temp.length;i++){
	         if(temp[i].checked==true){
	         //alert(temp[i].value);
	         ids = ids + temp[i].id + ",";
	         names = names + temp[i].value + ",";
	     } 
	 } 
	 }else {
		 var ids = "";
		 var names = "";
		 var temp= document.getElementsByName('ch1');
	     for(var i=0;i<temp.length;i++){
	         if(temp[i].checked==true){
	         //alert(temp[i].value);
	         ids = ids + temp[i].id + ",";
	         names = names + temp[i].value + ",";
	     } 
	 } 
	 }
	 
	$("#rec", parent.document).val(names);
	$("#recids", parent.document).val(ids);
	closeCurwin();
}
</script>
<table id="listTable">
<tbody>
<tr>
<th colspan="2"><img src="${ctx}/static/images/pages/cen/rig/ico_02.png" align="absmiddle">&nbsp;选择收件人</th>
</tr> 
    <tr>
      <td class="tab_td_all">
		<form name="searchForm" action="${baseURL}/monitor/selRec" method="post">
			<img src="${baseURL}/static/images/tab/ico.png" width="20" height="10" />收件人：
			<input type="text" name="cName" value="${param['cName']}" size="20" class="but_sh"/>
			&nbsp;&nbsp;&nbsp;
			<input class="tab_but" type="button" value="查询" onclick="queryComp();"/>
		</form>
    </td>
    </tr>

<c:if test="${empty obj}">
		<b>没有符合条件的记录。</b>
	</c:if>
<c:if test="${not empty obj}">
    
    <c:forEach var="oneRow" items="${obj}" varStatus="status">
    		
    <tr>
    	<td class="tab_td_all"><input type="checkbox" name="ch1" id="${oneRow.users[0]}" value="${oneRow.unitName}"/>${oneRow.unitName}</td>
    </tr>
    </c:forEach>
</c:if>
<tr>
<td class="tab_td_all" align="center" colspan="2"><input class="tab_but" type="button" value="确定"
				onclick="selectOpt('${recNames}','${recIds}');" /><input class="tab_but" type="button" value="关闭"
				onclick="closeCurwin();" /></td>
</tr>

</tbody>
</table>
<%@ include file="/static/include/bottom.jsp"%>